package com.meituan.catering.management.common.model.enumeration;

/**
 * @author mac
 */

public enum ErrorCode implements IError {
    PARAM_ERROR(630001, "参数错误"),
    SYSTEM_ERROR(630002, "系统异常"),
    ENABLED_ERROR(630003, "门店已开启"),
    DISABLE_ERROR(630004, "门店已关闭"),
    VERSION_ERROR(630005, "版本错误"),
    QUANTITY_ERROR(630006, "数量错误"),
    STATUS_ERROR(630007, "状态错误"),
    PROMOTION_ERROR(630008, "优惠金额错误"),
    PAID_ERROR(630009, "支付金额错误"),
    PRODUCT_ERROR(630008, "商品不存在"),
    SHOP_ERROR(630008, "门店不存在"),
    TABLE_NO_ERROR(630009, "座位号重复");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "ErrorCode{" + "code=" + code + ", message='" + message + '\'' + '}';
    }

}
